#_*_ coding: utf-8 _*_
from django.shortcuts import render
from models import Section, Materials, Category, Author
from django.shortcuts import render_to_response
from django.template import RequestContext

def Bpk(request):
	bpk_docs = Materials.objects.order_by('title')
	Menu = {}
	Categs = Category.objects.order_by("title")
	Sects = Section.objects.order_by("category","title")
	for categ in Categs:
		Menu[categ] = Section.objects.filter(category__title=categ)
	return render_to_response("bpk.html",{'page_title':u'БПК','page_brand':u'БПК','Docs':bpk_docs,'menu':Menu},context_instance=RequestContext(request))

# Create your views here.
